/*
 * eeprom.h
 *
 *  Created on: Apr 8, 2012
 *      Author: brent.reamer
 */

#ifndef EEPROM_H_
#define EEPROM_H_

#define EEP_BLNK 0
#define EEP_A_BLNK 0x01
#define EEP_D_BLNK 0x00

#define EEP_ASWITCH 1
#define EEP_A_ASWITCH 0x02
#define EEP_D_ASWITCH 0x00


uint8_t eep_addrs[]=
	{
			EEP_A_BLNK,
			EEP_A_ASWITCH,
	};

uint8_t eep_defaults[]=
	{
			EEP_D_BLNK,
			EEP_D_ASWITCH,
	};


#define EepSetValue(_x,_y) 	eeprom_write_byte((uint8_t*)eep_addrs[_x],(uint8_t)_y)
#define EepGetValue(_x) 	eeprom_read_byte((uint8_t*)eep_addrs[_x])
#define EepSetDefault(_x) 	eeprom_write_byte((uint8_t*)eep_addrs[_x],eep_defaults[_x])
#define EepGetDefault(_x) 	(uint8_t)eep_defaults[_x]


#endif /* EEPROM_H_ */
